<template>
  <div class="sonb">
    <h4>{{ num }}</h4>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: ''
    }
  },
  mounted() {
    this.$bus.$on('atob', (num) => {
      this.num = num
      console.log(this.num)
    })
  },
  beforeDestroy() {
    this.$bus.$off('atob')
  }
}
</script>

<style lang="scss" scoped>
.sonb {
  width: 200px;
  height: 200px;
  background-color: #90f;
}
</style>
